package com.ubst.smartad.dbpool;

import java.sql.Connection;
import javax.sql.DataSource;
import javax.naming.Context;
import javax.naming.InitialContext;

public class TransactionManager {

    public Connection connection = null;

    public TransactionManager(){
        try {
			//Context ic = new InitialContext();
			//DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/MysqlDS");
			//this.connection  = ds.getConnection();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    public void freeConnection() {
        try {
			if(this.connection!=null){	
            	this.connection.close();
			}
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

} //end of the class

